package com.guguskins.back.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.guguskins.back.entity.GuGoods;
import com.guguskins.back.entity.GuInventory;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author mybatis-plus
 * @since 2021-05-18
 */
@Repository
public interface GuInventoryMapper extends BaseMapper<GuInventory> {

    List<GuGoods> getGoodsInventoryPageData(@Param("userId") Long userId, @Param("state") int state, @Param("index") int index, @Param("size") int size);

    long getGoodsInventoryCount(@Param("userId") Long userId, @Param("state") int state);

    List<GuGoods> listByBoxId(@Param("boxId") long boxId, @Param("size") long size);

    List<GuGoods> listAll(@Param("size") long size);

    GuInventory bestInventory(@Param("userId") Long userId, @Param("sources") List<Integer> sources);

    List<GuInventory> findAll(@Param("pageNum") int pageNum, @Param("pageSize") int pageSize);

    long getGuInventoryCount();
}
